home *** CD-ROM | disk | FTP | other *** search
- Q32556 Incorrect Code with /AH and Address Addition
- C Compiler
- 5.10 | 5.10
- MS-DOS | OS/2
-
- Summary:
- The code generated for the example below is incorrect when compiled
- with /AH /Od. The code generated for this instruction:
-
- *((BYTE *)&count+2
-
- loads the bx register and then immediately overwrites it with the
- mov bx,ss instruction.
-
- Microsoft has confirmed this to be a problem in Version 5.10 of the
- C compiler. We are researching this problem and will post new
- information as it becomes available.
- You can work around this problem by removing one of the register
- int declarations.
-
- More Information:
- The following is an example:
-
- typedef unsigned char BYTE;
-
- void nserver()
- {
- register int iostatus;
- register int psn;
- long count;
-
- psn = 10;
- iostatus = 20;
- count = *((BYTE *)&count+3) | *((BYTE *)&count+2) << 8;
- }
-
-
-
- Keywords: buglist5.10 qfbv
- Updated 88/07/21 03:19
-